From: Carlos Garnacho Date: Wed, 5 Nov 2025 11:41:02 +0000 (+0100) Subject: pointerA11yTimeout: Set the cursor through ClutterActor API X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~39^2~1^2~68 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=11726b7270fd350993d6136844587e06e6d94b6b;p=gnome-shell.git pointerA11yTimeout: Set the cursor through ClutterActor API Set the cursor on the stage. This differs with the "root" cursor approach in that actors with a non-inherited cursor (e.g. I-beam on text actors) will stick to that instead of showing the cursor as set here. If that's turns out not to be enough, might make sense to move this piece of a11y feedback to Mutter. Part-of: --- diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js index b96b4ec1a..8e77719b9 100644 --- a/js/ui/pointerA11yTimeout.js +++ b/js/ui/pointerA11yTimeout.js @@ -1,6 +1,5 @@ import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; import St from 'gi://St'; import * as Main from './main.js'; import Cairo from 'gi://cairo'; @@ -123,7 +122,7 @@ export class PointerA11yTimeout { this._pieTimer.start(x, y, timeout); if (type === Clutter.PointerA11yTimeoutType.GESTURE) - global.display.set_cursor(Meta.Cursor.CROSSHAIR); + global.stage.set_cursor_type(Clutter.CursorType.CROSSHAIR); }); seat.connect('ptr-a11y-timeout-stopped', (o, type, clicked) => { @@ -131,7 +130,7 @@ export class PointerA11yTimeout { this._pieTimer?.destroy(); if (type === Clutter.PointerA11yTimeoutType.GESTURE) - global.display.set_cursor(Meta.Cursor.DEFAULT); + global.stage.set_cursor_type(Clutter.CursorType.DEFAULT); }); } }